package com.itljm.cxrMarket.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 购物车
 */
@TableName(value ="shopping_cart")
@Data
public class ShoppingCart implements Serializable {
    @TableId(type = IdType.AUTO)
    private Integer cartId;
    private Long userId; // 用户ID
    private Integer productId; // 商品ID
    private Integer quantity; // 商品数量
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date addedDate; // 添加时间
    private Integer checked; // 是否选中 0 未选中 1 已选中

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}